package cn.woo5.test.securitytest.domain;

import org.springframework.security.core.authority.AuthorityUtils;

/**
 * Created by wanghao on 3/20/17.
 */
public class CurrentUser extends org.springframework.security.core.userdetails.User {
  private final Object user;

  public CurrentUser(final Admin admin) {
    super(admin.getEmail(), "", AuthorityUtils.createAuthorityList("ADMIN"));
    this.user = admin;
  }

  public Object getUser() {
    return this.user;
  }
}
